﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using xplang.parse;

namespace xplang.errors
{
  public abstract class Error
  {
    public static readonly List<Error> buildErrors = new List<Error>();

    public Error(Token pos)
    {
      buildErrors.Add(this);
      this.pos = pos;
      stacktrace = Environment.StackTrace;
    }
    public readonly Token pos;
    public abstract String message();
    public readonly string stacktrace;
  }

}
